from typing import List


class Solution:
    def insertionSort(self, nums: List) -> List:
        if len(nums) < 2:
            return nums
        for i in range(1, len(nums)):
            for j in range(i-1, -1, -1):
                if nums[j+1] < nums[j]:
                    nums[j+1], nums[j] = nums[j], nums[j+1]
                else:
                    break


if __name__ == '__main__':
    t = [3, 1, 5, -6, 7, 12, 2, 9, 10]
    x = Solution()
    x.insertionSort(t)
    print(t)
